<form class="form-horizontal" id="form-add-article">
    
    <div class="form-group">
        <label class="control-label col-xs-2">地区<span style="color: #FF0000;">*</span></label>
        <div class="col-xs-9">
            {include file="public/areaSelector" province-name="pro" city-name="city" /}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            登录账号
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" maxlength="100" name="account"
                   placeholder="请输入商会后台登录账号" required>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            登录密码
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="password"
                   placeholder="请输入商会后台登录密码" required>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            商会名称
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="title"
                   placeholder="请输入商会名称" required>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-2">
            logo
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            {include file="public/singleImageUploader" uploader-name="thumb" /}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            联系电话
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="tel"
                   placeholder="请输入联系电话" required>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            详细地址
            <span style="color: #FF0000;">*</span>
        </label>
        <div class="col-xs-9">
            <input type="text" class="form-control" name="address" maxlength="255"
                   placeholder="请输入详细地址" required>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-2">
            排序
        </label>
        <div class="col-xs-9">
            <input type="number" class="form-control" name="order"
                   placeholder="数字越大 排序越靠前">
        </div>
    </div>



    <div class="form-group">
        <label class="control-label col-xs-2">
            首页推荐
        </label>
        <div class="col-xs-9">
            <div class="btn-group" data-toggle="buttons">
                <label class="btn btn-default">
                    <input type="radio" name="recommend" id="recommend_1" value="1">
                    推荐
                </label>
                <label class="btn btn-default active">
                    <input type="radio" name="recommend" id="recommend_0" value="0" checked>
                    不推荐
                </label>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-2">
            商会简介
        </label>
        <div class="col-xs-9">
            {include file="public/ueditor" editor-name="article_detail" /}
        </div>
    </div>

    <div class="form-group">
        <div class="col-xs-offset-2 col-xs-3">
            <button type="submit" class="btn btn-success btn-block">
                添加
            </button>
        </div>
    </div>
</form>

<script src="__PUBLIC__/vendors/jquery.validation/jquery.validate.min.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/additional-methods.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/messages_zh.min.js"></script>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {
        $("#form-add-article").validate({
            messages:
                {   account:"请输入商会后台登录账号",
                    password:"请输入商会后台登录密码",
                    title: "请输入商会名称",
                    tel:"请输入联系电话",
                    address:"请输入详细地址"
                },
            debug: true,
            submitHandler: function () {
                ajaxSubmit('form-add-article', true);
            }
        });

    })
</script>